last-ditch effort
A desperate final attempt, as in
We're making a last-ditch effort to finish on time
. This expression alludes to the military sense of
last ditch
, “the last line of defense.” Its figurative use dates from the early 1800s.